import request from "@/request";

// 获取用户列表
export const getUserList = () => {
  return request.get("/api/v1/user/list");
};

// 获取用户详情
export const getUserDetail = (id) => {
  return request.get(`/api/v1/user/${id}`);
};

// 删除用户
export const deleteUser = (params) => {
  return request.post(`/api/v1/user/delete`, params);
};

// 注册用户
export const createUser = (params) => {
  return request.post(`/api/v1/user/register`, params);
};

// 更新用户
export const updateUser = (params) => {
  return request.post(`/api/v1/user/update`, params);
};

// 重置密码
export const resetPassword = (params) => {
  return request.post(`/api/v1/user/reset-password`, params);
};

// 登录
export const login = (params) => {
  return request.post(`/api/v1/user/login`, params);
};
